package test22;

import test21.Cat;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-12-14
 * Time: 19:00
 */


public class Main2 {
    public static void main(String[] args) {
        /*//对整数List进行排序
        List<Integer> list1 = new ArrayList<>();
        for (int i = 10; i >=0 ; i--) {
            list1.add(i);
        }
        Collections.sort(list1);
        for (Integer i :list1) {
            System.out.print(i+" ");
        }*/
        List<String> list = new ArrayList<>();
        list.add("ddd");
        list.add("eee");
        list.add("abc");
        list.add("bca");
        Collections.sort(list);
        for (String s :list) {
            System.out.print(s+" ");
        }
    }
}
